# -*- coding: utf-8 -*-
"""
LoginPage - 登录页面
"""
from playwright.async_api import Page
from base.page_object import PageElement


class LoginPage():
    """登录页面元素"""
    
    def __init__(self, page: Page):
        self.page = page
    
    email_input = PageElement(css='input[placeholder*="邮箱"], input[type="email"]', describe="邮箱输入框")
    password_input = PageElement(css='input[type="password"]', describe="密码输入框")
    login_button = PageElement(css='button:has-text("登录")', describe="登录按钮")

    # 动态元素定义
    warehouse_button = PageElement(locator_type="role", dynamic=True, describe="仓库按钮")
    warehouse_option = PageElement(locator_type="text", dynamic=True, describe="仓库选项")

